import java.util.Scanner;
public class DigitalPyramid{
public static void main(String[]args){
int i,j,k,l,m,n;
Scanner input =new Scanner(System.in);
System.out.println("please enter the number of line");
i=input.nextInt();
for(j=0;j<=i;j++)
{
  for(k=i-j;k>=0;k--)
  {
    System.out.print(" ");
  }
  for (l=j;l>0;l--)
  {
    System.out.print(l);
  }
  for(m=2;m<=j;m++)
	  System.out.print(m);
  
System.out.println();
}
}
}
